<?php
/**
 * Notes:
 * User: wudg <544038230@qq.com>
 * Date: 2025/9/15 11:58
 */

namespace App\Components\Logs\User;


use App\Dao\Users\UsersAmountLogsDao;
use App\Model\Users\UsersAmountLog;
use Hyperf\AsyncQueue\Job;

class UsersAmountLogs extends Job
{
    /**
     * 最大尝试次数
     * @var int
     */
    protected int $maxAttempts = 1;


    /**
     * @var array 写入内容
     */
    protected $logData;



    public function __construct(array $data)
    {
        $this->logData = $data;
    }
    public function handle()
    {
        $userAmountLog = new UsersAmountLog();
        (new UsersAmountLogsDao())->add($userAmountLog,$this->logData);

    }
}